package com.mj.mapper;

import com.mj.entity.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentMapper {
    /*@Delete("delete from student where id=#{id}")
    public int deleteById(int id);

    @Select("select * from student")
    public List<Student> query();*/
    @Select("select * from student where id=#{id}")
    public Student queryById(int id);

    @Insert("insert into student values(null,#{name},#{age},#{dept},#{score})")
    public int insert(Student student);

    public int update(Student student);
}
